package util

const (
	//Authorization Reqiest
	RESPONSE_TYPE = 1000
	CLIENT_ID     = 1001
	STATE         = 1002
	REDIRECT_URL  = 1003
	SCOPE         = 1004

	CODE = 2000

	GRANT_TYPE    = 4000
	CLIENT_SECRET = 4001

	ACCESS_TOKEN  = 5000
	REFRESH_TOKEN = 5001
	EXPIRES_IN    = 5002
	ID_TOKEN      = 5003
)

var codeMsg = map[int]string{
	RESPONSE_TYPE: "response_code",
	CLIENT_ID:     "client_id",
	STATE:         "state",
	REDIRECT_URL:  "redirect_url",
	SCOPE:         "scope",

	CODE: "code",

	GRANT_TYPE:    "grant_type",
	CLIENT_SECRET: "client_secret",

	ACCESS_TOKEN:  "access_token",
	REFRESH_TOKEN: "refresh_token",
	EXPIRES_IN:    "expires_in",
	ID_TOKEN:      "id_token",
}

func GetCode(code int) (msg string) {
	return codeMsg[code]
}
